blob: f5bf338ed48a333900352dd035a3d40150c5b32d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
|
import { get } from '$lib/utils';
import { error } from '@sveltejs/kit';
export let load = async ({ params: { username } }) => {
try {
return { subject: await get(`/users/${username}`) };
} catch (e) {
if (username.length === 64) return { subject: { username, pubkey: username } };
throw error(500, 'Unable to retrieve user account data');
}
};
|